/*
 * Created on Sep 29, 2006
 */
package com.scalar.chiptrack.operations.distributor.forms;

import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionMapping;

import com.scalar.chiptrack.ChipTrackActionForm;
import com.scalar.chiptrack.utils.AutoGrowingArrayList;
import com.scalar.chiptrack.operations.distributor.DistributorInventory;

/**
 * @author ravi
 */
public class DistributorInventoryForm  extends ChipTrackActionForm 
{
	int product_Id = -1;
	int requestedQty = 0;
	int lineItemId = 0;
	int distributorId = 0;
	String partNumber = "";
	String distributor = "";
    int lineItemNo = 0;
    private String status = null;

    private ArrayList inventoryList      = new AutoGrowingArrayList( DistributorInventory.class );

    /**
	 * @return Returns the distributor.
	 */
	public String getDistributor() {
		return distributor;
	}
	/**
	 * @param distributor The distributor to set.
	 */
	public void setDistributor(String distributor) {
		this.distributor = distributor;
	}
	/**
	 * @return Returns the partNumber.
	 */
	public String getPartNumber() {
		return partNumber;
	}
	/**
	 * @param partNumber The partNumber to set.
	 */
	public void setPartNumber(String partNumber) {
		this.partNumber = partNumber;
	}

	public void reset( ActionMapping mapping, HttpServletRequest request ) 
	{
		if( inventoryList != null )
		{
			int listSize = inventoryList.size();
            for (int i = 0; i < listSize; i++)
            {
                DistributorInventory distributorInventory = (DistributorInventory) inventoryList.get(i);
                distributorInventory.setChecked( false );
            }
		}

	}
	
	/**
	 * @return Returns the distributorId.
	 */
	public int getDistributorId() {
		return distributorId;
	}
	/**
	 * @param distributorId The distributorId to set.
	 */
	public void setDistributorId(int distributorId) {
		this.distributorId = distributorId;
	}
	/**
	 * @return Returns the lineItemId.
	 */
	public int getLineItemId() {
		return lineItemId;
	}
	/**
	 * @param lineItemId The lineItemId to set.
	 */
	public void setLineItemId(int lineItemId) {
		this.lineItemId = lineItemId;
	}

	/**
	 * @return Returns the product_Id.
	 */
	public int getProduct_Id() {
		return product_Id;
	}
	/**
	 * @param product_Id The product_Id to set.
	 */
	public void setProduct_Id(int product_Id) {
		this.product_Id = product_Id;
	}
	/**
	 * @return Returns the requestedQty.
	 */
	public int getRequestedQty() {
		return requestedQty;
	}
	/**
	 * @param requestedQty The requestedQty to set.
	 */
	public void setRequestedQty(int requestedQty) {
		this.requestedQty = requestedQty;
	}
	/**
	 * @return Returns the inventoryList.
	 */
	public ArrayList getInventoryList() {
		return inventoryList;
	}
	/**
	 * @param inventoryList The inventoryList to set.
	 */
	public void setInventoryList(ArrayList inventoryList) {
		this.inventoryList = inventoryList;
	}

    public int getLineItemNo() {
        return lineItemNo;
    }

    public void setLineItemNo(int lineItemNo) {
        this.lineItemNo = lineItemNo;
    }


    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

}
